<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
        
    <script>
      let num=100,num1=0,num2=0
    while(true)
    {
         let tr=+prompt(`请输入你的操作：
        1.存钱
        2.取钱
        3.查看余额
        4.退出`)
        if(tr===4)break
        switch(tr){
        case 1:
            num1=+prompt('存多少钱')
            num+=num1
            break
        case 2:
            num2=+prompt('取多少钱')
            num-=num2
            break
        case 3:
            alert(num)
            break
    }
       
    }
      
        
    </script>
</body>
</html>